/****************************************************************************
 *
 *   Copyright (c) 2020-2021 PX4 Development Team. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 * 3. Neither the name PX4 nor the names of its contributors may be
 *    used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 ****************************************************************************/

#include <stdint.h>

static constexpr float SAMPLING_RES = 10;
static constexpr float SAMPLING_MIN_LAT = -90;
static constexpr float SAMPLING_MAX_LAT = 90;
static constexpr float SAMPLING_MIN_LON = -180;
static constexpr float SAMPLING_MAX_LON = 180;

static constexpr int LAT_DIM = 19;
static constexpr int LON_DIM = 37;


// *INDENT-OFF*
// Magnetic declination data in radians * 10^-4
// Model: WMM-2020,
// Version: 0.5.1.11,
// Date: 2021.926,
static constexpr const int16_t declination_table[19][37] {
	//    LONGITUDE:   -180,  -170,  -160,  -150,  -140,  -130,  -120,  -110,  -100,   -90,   -80,   -70,   -60,   -50,   -40,   -30,   -20,   -10,     0,    10,    20,    30,    40,    50,    60,    70,    80,    90,   100,   110,   120,   130,   140,   150,   160,   170,   180,
	/* LAT: -90 */ {  26002, 24257, 22512, 20766, 19021, 17276, 15530, 13785, 12040, 10294,  8549,  6804,  5059,  3313,  1568,  -177, -1923, -3668, -5413, -7158, -8904,-10649,-12394,-14140,-15885,-17630,-19376,-21121,-22866,-24612,-26357,-28103,-29848, 31239, 29493, 27748, 26002, },
	/* LAT: -80 */ {  22571, 20437, 18495, 16719, 15078, 13539, 12074, 10662,  9287,  7936,  6604,  5285,  3976,  2671,  1364,    45, -1295, -2666, -4075, -5525, -7018, -8553,-10130,-11747,-13411,-15127,-16912,-18783,-20764,-22881,-25154,-27588,-30157, 30034, 27413, 24904, 22571, },
	/* LAT: -70 */ {  14971, 13574, 12450, 11491, 10624,  9794,  8954,  8068,  7116,  6098,  5028,  3934,  2848,  1791,   769,  -242, -1278, -2381, -3579, -4876, -6253, -7681, -9126,-10567,-11992,-13407,-14834,-16318,-17938,-19845,-22355,-26138, 30776, 24172, 19626, 16844, 14971, },
	/* LAT: -60 */ {   8396,  8156,  7880,  7610,  7360,  7110,  6805,  6375,  5763,  4945,  3946,  2834,  1713,   681,  -204,  -965, -1694, -2514, -3512, -4703, -6028, -7394, -8713, -9924,-10989,-11889,-12606,-13102,-13274,-12825,-10731, -3558,  4833,  7607,  8391,  8525,  8396, },
	/* LAT: -50 */ {   5466,  5505,  5452,  5367,  5296,  5262,  5230,  5106,  4766,  4106,  3099,  1829,   486,  -699, -1578, -2150, -2551, -2988, -3665, -4667, -5902, -7174, -8315, -9220, -9823,-10068, -9880, -9129, -7626, -5269, -2368,   379,  2488,  3912,  4786,  5261,  5466, },
	/* LAT: -40 */ {   3941,  4035,  4045,  4004,  3947,  3916,  3923,  3914,  3744,  3214,  2197,   759,  -807, -2128, -3001, -3462, -3653, -3716, -3879, -4432, -5394, -6464, -7352, -7897, -8013, -7645, -6764, -5384, -3670, -1964,  -502,   720,  1762,  2626,  3280,  3710,  3941, },
	/* LAT: -30 */ {   2972,  3059,  3092,  3082,  3027,  2951,  2893,  2861,  2736,  2263,  1236,  -278, -1887, -3148, -3899, -4253, -4341, -4141, -3709, -3471, -3814, -4554, -5256, -5615, -5499, -4921, -3967, -2759, -1546,  -596,    84,   685,  1307,  1907,  2414,  2774,  2972, },
	/* LAT: -20 */ {   2329,  2376,  2397,  2404,  2365,  2274,  2169,  2094,  1950,  1459,   412, -1071, -2552, -3623, -4167, -4294, -4100, -3552, -2695, -1887, -1593, -1936, -2584, -3060, -3105, -2752, -2120, -1302,  -521,   -27,   238,   541,   980,  1454,  1873,  2178,  2329, },
	/* LAT: -10 */ {   1935,  1931,  1913,  1915,  1891,  1810,  1703,  1615,  1431,   885,  -170, -1543, -2821, -3661, -3941, -3725, -3158, -2381, -1534,  -774,  -300,  -322,  -786, -1294, -1513, -1428, -1116,  -616,  -115,   130,   182,   344,   712,  1145,  1534,  1818,  1935, },
	/* LAT:   0 */ {   1723,  1690,  1638,  1634,  1627,  1562,  1461,  1351,  1098,   481,  -555, -1781, -2841, -3439, -3451, -2962, -2198, -1415,  -760,  -221,   196,   315,    42,  -374,  -633,  -691,  -593,  -330,   -37,    56,    -2,    88,   427,   864,  1279,  1596,  1723, },
	/* LAT:  10 */ {   1589,  1597,  1559,  1578,  1608,  1562,  1446,  1263,   889,   173,  -846, -1924, -2758, -3108, -2916, -2317, -1543,  -828,  -309,    74,   401,   554,   398,    76,  -161,  -269,  -291,  -208,  -102,  -141,  -277,  -249,    50,   499,   976,  1380,  1589, },
	/* LAT:  20 */ {   1408,  1558,  1621,  1715,  1804,  1787,  1637,  1339,   796,   -60, -1103, -2059, -2664, -2783, -2464, -1866, -1156,  -505,   -40,   272,   532,   681,   594,   351,   150,    33,   -56,  -118,  -196,  -384,  -619,  -677,  -445,    -2,   536,  1052,  1408, },
	/* LAT:  30 */ {   1112,  1480,  1741,  1966,  2127,  2140,  1956,  1537,   811,  -218, -1339, -2223, -2647, -2593, -2199, -1622,  -967,  -348,   118,   427,   660,   809,   792,   644,   494,   369,   215,     8,  -272,  -644, -1013, -1173, -1016,  -593,   -18,   591,  1112, },
	/* LAT:  40 */ {    761,  1348,  1842,  2235,  2484,  2529,  2316,  1784,   874,  -355, -1600, -2475, -2804, -2658, -2215, -1624,  -971,  -340,   173,   541,   814,  1015,  1112,  1103,  1027,   879,   614,   208,  -326,  -932, -1454, -1701, -1587, -1172,  -573,   100,   761, },
	/* LAT:  50 */ {    477,  1226,  1906,  2463,  2829,  2935,  2706,  2052,   909,  -594, -2025, -2949, -3250, -3061, -2573, -1927, -1217,  -517,   102,   610,  1031,  1389,  1673,  1846,  1867,  1682,  1243,   541,  -349, -1251, -1934, -2224, -2103, -1662, -1025,  -289,   477, },
	/* LAT:  60 */ {    291,  1146,  1952,  2646,  3148,  3358,  3142,  2327,   804, -1168, -2897, -3884, -4139, -3879, -3306, -2559, -1731,  -888,   -77,   677,  1372,  2005,  2551,  2950,  3114,  2934,  2304,  1196,  -214, -1536, -2411, -2725, -2561, -2065, -1368,  -562,   291, },
	/* LAT:  70 */ {     75,  1014,  1913,  2711,  3324,  3614,  3355,  2205,   -64, -2807, -4770, -5593, -5595, -5106, -4331, -3392, -2363, -1293,  -216,   847,  1875,  2844,  3715,  4425,  4878,  4918,  4321,  2864,   683, -1426, -2731, -3180, -3021, -2486, -1732,  -856,    75, },
	/* LAT:  80 */ {   -570,   355,  1210,  1904,  2287,  2091,   852, -1851, -5144, -7271, -7998, -7845, -7199, -6268, -5168, -3961, -2689, -1379,   -50,  1281,  2597,  3881,  5109,  6249,  7246,  8007,  8354,  7923,  6041,  2350, -1215, -2947, -3330, -3012, -2341, -1493,  -570, },
	/* LAT:  90 */ { -30073,-28327,-26582,-24836,-23091,-21346,-19600,-17855,-16110,-14364,-12619,-10874, -9129, -7384, -5639, -3893, -2148,  -403,  1342,  3087,  4833,  6578,  8323, 10068, 11814, 13559, 15304, 17050, 18795, 20541, 22286, 24032, 25777, 27523, 29268, 31014,-30073, },
};

// Magnetic inclination data in radians * 10^-4
// Model: WMM-2020,
// Version: 0.5.1.11,
// Date: 2021.926,
static constexpr const int16_t inclination_table[19][37] {
	//    LONGITUDE:   -180,  -170,  -160,  -150,  -140,  -130,  -120,  -110,  -100,   -90,   -80,   -70,   -60,   -50,   -40,   -30,   -20,   -10,     0,    10,    20,    30,    40,    50,    60,    70,    80,    90,   100,   110,   120,   130,   140,   150,   160,   170,   180,
	/* LAT: -90 */ { -12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575,-12575, },
	/* LAT: -80 */ { -13661,-13528,-13367,-13187,-12993,-12791,-12587,-12386,-12195,-12018,-11861,-11727,-11616,-11530,-11467,-11425,-11406,-11408,-11436,-11490,-11573,-11687,-11832,-12005,-12203,-12420,-12649,-12882,-13110,-13322,-13509,-13660,-13764,-13816,-13813,-13759,-13661, },
	/* LAT: -70 */ { -14111,-13792,-13473,-13150,-12817,-12473,-12118,-11760,-11416,-11106,-10853,-10668,-10555,-10502,-10489,-10493,-10501,-10512,-10536,-10592,-10700,-10873,-11118,-11432,-11804,-12220,-12668,-13132,-13598,-14051,-14469,-14815,-15006,-14954,-14724,-14426,-14111, },
	/* LAT: -60 */ { -13521,-13168,-12831,-12498,-12155,-11782,-11367,-10912,-10443,-10011, -9679, -9502, -9496, -9632, -9837,-10031,-10159,-10206,-10196,-10183,-10229,-10386,-10672,-11078,-11574,-12129,-12715,-13311,-13899,-14461,-14957,-15248,-15075,-14692,-14286,-13894,-13521, },
	/* LAT: -50 */ { -12497,-12156,-11826,-11504,-11181,-10834,-10434, -9963, -9432, -8909, -8516, -8386, -8582, -9041, -9605,-10120,-10484,-10653,-10629,-10481,-10339,-10340,-10556,-10968,-11507,-12098,-12685,-13225,-13672,-13971,-14080,-14007,-13804,-13521,-13193,-12846,-12497, },
	/* LAT: -40 */ { -11240,-10893,-10547,-10202, -9863, -9524, -9163, -8737, -8215, -7648, -7217, -7169, -7621, -8441, -9363,-10195,-10859,-11300,-11449,-11290,-10951,-10676,-10662,-10937,-11395,-11900,-12347,-12672,-12833,-12839,-12749,-12611,-12431,-12199,-11912,-11585,-11240, },
	/* LAT: -30 */ {  -9601, -9225, -8848, -8459, -8066, -7690, -7332, -6940, -6426, -5814, -5356, -5429, -6187, -7383, -8635, -9735,-10653,-11370,-11778,-11780,-11415,-10908,-10569,-10563,-10810,-11132,-11390,-11507,-11446,-11270,-11095,-10959,-10811,-10603,-10322, -9977, -9601, },
	/* LAT: -20 */ {  -7370, -6934, -6521, -6094, -5650, -5219, -4826, -4410, -3842, -3155, -2700, -2947, -4044, -5649, -7279, -8655, -9728,-10511,-10959,-11003,-10647,-10037, -9477, -9228, -9273, -9435, -9578, -9598, -9427, -9155, -8959, -8869, -8762, -8553, -8236, -7825, -7370, },
	/* LAT: -10 */ {  -4413, -3884, -3435, -3001, -2544, -2092, -1676, -1217,  -587,   120,   490,    77, -1237, -3147, -5125, -6743, -7850, -8493, -8766, -8710, -8308, -7629, -6965, -6615, -6573, -6666, -6785, -6811, -6624, -6327, -6170, -6174, -6129, -5910, -5527, -5002, -4413, },
	/* LAT:   0 */ {   -904,  -289,   171,   571,   988,  1406,  1798,  2247,  2837,  3419,  3629,  3145,  1863,   -39, -2084, -3745, -4767, -5205, -5270, -5105, -4670, -3960, -3255, -2881, -2819, -2890, -3016, -3090, -2961, -2725, -2667, -2804, -2860, -2670, -2246, -1620,  -904, },
	/* LAT:  10 */ {   2563,  3182,  3611,  3950,  4304,  4671,  5026,  5418,  5875,  6250,  6292,  5813,  4740,  3182,  1491,   107,  -709,  -965,  -879,  -647,  -240,   394,  1026,  1366,  1428,  1381,  1279,  1188,  1231,  1336,  1264,  1004,   819,   894,  1246,  1845,  2563, },
	/* LAT:  20 */ {   5417,  5940,  6316,  6610,  6923,  7267,  7612,  7963,  8301,  8505,  8422,  7966,  7137,  6045,  4918,  4005,  3469,  3343,  3489,  3729,  4057,  4520,  4979,  5235,  5291,  5271,  5221,  5164,  5154,  5138,  4967,  4639,  4346,  4259,  4431,  4851,  5417, },
	/* LAT:  30 */ {   7569,  7940,  8255,  8537,  8846,  9194,  9553,  9897, 10177, 10294, 10152,  9735,  9109,  8399,  7737,  7223,  6927,  6881,  7020,  7229,  7474,  7771,  8059,  8233,  8289,  8300,  8301,  8292,  8271,  8190,  7971,  7621,  7269,  7050,  7034,  7227,  7569, },
	/* LAT:  40 */ {   9266,  9486,  9741, 10027, 10353, 10715, 11084, 11425, 11680, 11764, 11617, 11259, 10787, 10313,  9916,  9631,  9479,  9472,  9580,  9740,  9914, 10097, 10268, 10393, 10470, 10529, 10583, 10616, 10601, 10492, 10253,  9905,  9539,  9255,  9112,  9124,  9266, },
	/* LAT:  50 */ {  10801, 10923, 11125, 11395, 11718, 12073, 12429, 12747, 12971, 13031, 12893, 12596, 12231, 11885, 11608, 11421, 11326, 11320, 11385, 11486, 11599, 11714, 11830, 11945, 12063, 12184, 12297, 12370, 12362, 12239, 11995, 11668, 11329, 11044, 10855, 10775, 10801, },
	/* LAT:  60 */ {  12318, 12392, 12544, 12763, 13034, 13335, 13639, 13906, 14083, 14111, 13975, 13725, 13435, 13163, 12942, 12784, 12693, 12660, 12675, 12721, 12788, 12872, 12978, 13109, 13268, 13443, 13607, 13717, 13725, 13607, 13383, 13104, 12825, 12588, 12418, 12327, 12318, },
	/* LAT:  70 */ {  13758, 13802, 13899, 14042, 14222, 14427, 14636, 14818, 14923, 14902, 14763, 14560, 14342, 14137, 13963, 13828, 13733, 13678, 13658, 13670, 13712, 13783, 13885, 14021, 14187, 14374, 14558, 14699, 14747, 14676, 14516, 14318, 14123, 13958, 13838, 13770, 13758, },
	/* LAT:  80 */ {  15000, 15013, 15052, 15112, 15190, 15276, 15356, 15401, 15381, 15299, 15185, 15060, 14937, 14822, 14722, 14640, 14578, 14537, 14518, 14521, 14548, 14596, 14668, 14760, 14871, 14998, 15132, 15264, 15371, 15417, 15380, 15294, 15200, 15116, 15052, 15013, 15000, },
	/* LAT:  90 */ {  15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, 15393, },
};

// Magnetic strength data in milli-Gauss * 10
// Model: WMM-2020,
// Version: 0.5.1.11,
// Date: 2021.926,
static constexpr const int16_t strength_table[19][37] {
	//    LONGITUDE:  -180, -170, -160, -150, -140, -130, -120, -110, -100,  -90,  -80,  -70,  -60,  -50,  -40,  -30,  -20,  -10,    0,   10,   20,   30,   40,   50,   60,   70,   80,   90,  100,  110,  120,  130,  140,  150,  160,  170,  180,
	/* LAT: -90 */ {  5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, 5455, },
	/* LAT: -80 */ {  6061, 5998, 5920, 5828, 5725, 5614, 5496, 5374, 5252, 5132, 5018, 4912, 4819, 4739, 4675, 4630, 4606, 4603, 4624, 4670, 4740, 4834, 4948, 5080, 5223, 5373, 5522, 5666, 5797, 5910, 6003, 6072, 6117, 6137, 6133, 6107, 6061, },
	/* LAT: -70 */ {  6306, 6173, 6024, 5860, 5681, 5490, 5285, 5070, 4851, 4635, 4432, 4250, 4092, 3960, 3856, 3779, 3732, 3719, 3747, 3822, 3949, 4129, 4357, 4624, 4918, 5225, 5529, 5813, 6063, 6267, 6418, 6514, 6556, 6549, 6500, 6417, 6306, },
	/* LAT: -60 */ {  6191, 6000, 5799, 5591, 5372, 5138, 4882, 4604, 4311, 4021, 3754, 3526, 3346, 3211, 3112, 3038, 2988, 2967, 2993, 3082, 3250, 3500, 3825, 4210, 4632, 5066, 5487, 5871, 6197, 6446, 6610, 6689, 6691, 6629, 6516, 6366, 6191, },
	/* LAT: -50 */ {  5847, 5618, 5387, 5157, 4925, 4680, 4410, 4107, 3778, 3446, 3144, 2903, 2741, 2649, 2600, 2566, 2533, 2507, 2512, 2583, 2755, 3043, 3437, 3907, 4413, 4919, 5395, 5814, 6153, 6396, 6534, 6576, 6534, 6425, 6264, 6066, 5847, },
	/* LAT: -40 */ {  5396, 5150, 4906, 4667, 4433, 4197, 3942, 3659, 3345, 3018, 2719, 2496, 2377, 2351, 2370, 2392, 2398, 2387, 2375, 2403, 2530, 2802, 3217, 3729, 4275, 4800, 5268, 5657, 5950, 6138, 6227, 6231, 6162, 6032, 5851, 5634, 5396, },
	/* LAT: -30 */ {  4880, 4640, 4402, 4168, 3942, 3723, 3505, 3274, 3018, 2743, 2485, 2301, 2230, 2254, 2320, 2392, 2459, 2510, 2533, 2546, 2611, 2806, 3164, 3649, 4180, 4678, 5099, 5417, 5621, 5721, 5748, 5722, 5642, 5511, 5332, 5116, 4880, },
	/* LAT: -20 */ {  4322, 4110, 3902, 3698, 3502, 3320, 3151, 2988, 2811, 2614, 2423, 2288, 2245, 2286, 2375, 2486, 2614, 2743, 2834, 2872, 2896, 2989, 3224, 3605, 4054, 4481, 4832, 5069, 5176, 5184, 5154, 5106, 5024, 4897, 4731, 4534, 4322, },
	/* LAT: -10 */ {  3790, 3631, 3478, 3332, 3197, 3077, 2974, 2883, 2786, 2672, 2551, 2451, 2403, 2425, 2509, 2638, 2794, 2953, 3079, 3143, 3158, 3183, 3303, 3552, 3877, 4199, 4465, 4629, 4666, 4615, 4547, 4483, 4394, 4269, 4121, 3957, 3790, },
	/* LAT:   0 */ {  3412, 3320, 3237, 3164, 3109, 3071, 3046, 3028, 3005, 2958, 2879, 2784, 2702, 2669, 2708, 2809, 2942, 3078, 3194, 3270, 3302, 3323, 3396, 3551, 3759, 3972, 4153, 4260, 4267, 4200, 4112, 4020, 3908, 3776, 3643, 3519, 3412, },
	/* LAT:  10 */ {  3283, 3252, 3233, 3230, 3254, 3302, 3359, 3413, 3449, 3440, 3372, 3257, 3129, 3032, 3003, 3043, 3123, 3221, 3322, 3407, 3471, 3533, 3620, 3737, 3871, 4009, 4129, 4200, 4203, 4142, 4033, 3890, 3728, 3569, 3434, 3338, 3283, },
	/* LAT:  20 */ {  3400, 3403, 3430, 3485, 3578, 3700, 3829, 3947, 4029, 4042, 3969, 3827, 3659, 3518, 3439, 3425, 3459, 3531, 3627, 3724, 3814, 3912, 4023, 4134, 4242, 4352, 4454, 4520, 4532, 4474, 4338, 4137, 3910, 3701, 3538, 3438, 3400, },
	/* LAT:  30 */ {  3723, 3731, 3787, 3887, 4031, 4203, 4379, 4536, 4645, 4672, 4599, 4443, 4253, 4087, 3979, 3932, 3934, 3984, 4070, 4167, 4264, 4369, 4485, 4603, 4722, 4848, 4967, 5054, 5081, 5025, 4870, 4631, 4357, 4103, 3904, 3777, 3723, },
	/* LAT:  40 */ {  4222, 4222, 4289, 4414, 4582, 4770, 4954, 5111, 5216, 5241, 5173, 5024, 4835, 4660, 4530, 4453, 4425, 4446, 4506, 4584, 4670, 4766, 4881, 5014, 5165, 5326, 5477, 5587, 5628, 5575, 5420, 5183, 4909, 4650, 4439, 4295, 4222, },
	/* LAT:  50 */ {  4832, 4826, 4884, 4995, 5143, 5303, 5453, 5574, 5647, 5656, 5592, 5464, 5300, 5135, 4997, 4898, 4842, 4829, 4853, 4902, 4971, 5061, 5180, 5330, 5505, 5689, 5855, 5974, 6020, 5977, 5847, 5651, 5426, 5209, 5030, 4901, 4832, },
	/* LAT:  60 */ {  5392, 5382, 5412, 5476, 5563, 5657, 5744, 5809, 5842, 5832, 5777, 5682, 5561, 5432, 5312, 5215, 5148, 5113, 5110, 5138, 5194, 5279, 5397, 5544, 5710, 5879, 6027, 6132, 6177, 6155, 6073, 5946, 5800, 5656, 5534, 5444, 5392, },
	/* LAT:  70 */ {  5726, 5707, 5706, 5719, 5742, 5768, 5791, 5805, 5804, 5784, 5744, 5686, 5615, 5539, 5464, 5400, 5351, 5323, 5318, 5337, 5382, 5451, 5542, 5651, 5768, 5883, 5982, 6056, 6096, 6099, 6070, 6017, 5950, 5879, 5814, 5762, 5726, },
	/* LAT:  80 */ {  5789, 5772, 5758, 5746, 5737, 5727, 5717, 5705, 5690, 5672, 5649, 5623, 5596, 5569, 5543, 5523, 5509, 5503, 5508, 5523, 5548, 5583, 5626, 5674, 5724, 5772, 5815, 5849, 5874, 5887, 5889, 5883, 5869, 5850, 5829, 5808, 5789, },
	/* LAT:  90 */ {  5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, 5680, },
};
